import Cookies from 'js-cookie';

// define a cookie key for the token
const TokenKey = 'Admin-Token';

export function getToken(key?: string) {
  return Cookies.get(key ?? TokenKey);
}

export function setToken(token, key?: string) {
  return Cookies.set(key ?? TokenKey, token);
}

export function removeToken(key?: string) {
  return Cookies.remove(key ?? TokenKey);
}
